import request from '../utils/request'

// 发送验证码
export const getCode = (data) => {
   return request.post('/get/code',data)
}

// 注册用户
export const Authentication = (data) => {
    return request.post('/user/authentication',data)
 }


 // 登录用户
export const login = (data) => {
    return request.post('/login',data)
 }


 // 账号列表数据
 export const AuthAdmin = (params) => {
    return request.get('/auth/admin',{params})
 }

// 菜单权限数据
export const userGetmenu = () => {
    return request.get('/user/getmenu')
 }

//  权限数据修改
export const userSetmenu = (data) => {
   return request.post('/user/setmenu',data)
}


// 菜单权限列表
export const menuList = (params) => {
   return request.get('/menu/list',{params})
}

// 菜单权限下拉数据
export const menuSelectlist = () => {
   return request.get('/menu/selectlist')
}


// 用户信息修改
export const updateUser = (data) => {
   return request.post('/update/user',data)
}

// 用户信息修改
export const menuPermissions = () => {
   return request.get('/menu/permissions')
}



// 陪护师列表
export const companionList = (params) => {
   return request.get('/companion/list',{params})
}

// 陪护师头像获取
export const photoList = () => {
   return request.get('/photo/list')
}

// 陪护师创建
export const Companion = (data) => {
   return request.post('/companion',data)
}

// 陪护师删除
export const deleteCompanion = (data) => {
   return request.post('/delete/companion',data)
}